package com.heima.api.auth;

import com.heima.model.admin.dtos.AuthDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "leadnews-user")
public interface IAuthClient {


    /**
     * 用户审核列表查询
     *
     * @param authDto
     * @return
     */
    @PostMapping("/api/v1/auth/list")
    ResponseResult list(@RequestBody AuthDto authDto);

    /**
     * 用户审核失败
     * @param authDto
     * @return
     */
    @PostMapping("/api/v1/auth/authFail")
     ResponseResult fail(@RequestBody AuthDto authDto);

    /**
     * 用户审核成功
     * @param authDto
     * @return
     */
    @PostMapping("/api/v1/auth/authPass")
     ResponseResult pass(@RequestBody AuthDto authDto);

    /**
     * 查询用户名字
     */
    @GetMapping("/api/v1/getNameById/{id}")
    String getById(@PathVariable Long id);


}